<?php
require_once "include/config.php";
require_once "include/functions.php";

function show_login_module()
{

if(is_user_loggedin()=="false")
{
echo "<div id='login'>
<form method='post' action='login.php'>
<label>user name:<input type='text' name='user' /></label>
<br><label>password:<input type='password' name='password' /></label>
<input type='hidden' name='login' value='yes' />
<br><label><input type='submit' value='login' /></label>
</form>
</div>
";
}
else
{
$username = get_user_info();
$username = $username['username'];
echo $username." logged in";
}

}

show_login_module();

?>